package com.spzx.channel.controller;

import com.spzx.channel.service.IIndexService;
import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.function.Uncheck;
import org.hibernate.validator.constraints.br.TituloEleitoral;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: IndexController
 * Package: com.spzx.channel.controller
 * Description:
 *
 * @Author ycy
 * @Create 2024/8/9 19:06
 * @Version 1.0
 */
@Slf4j
@Tag(name="首页管理")
@RestController
@RequestMapping("/index")
@SuppressWarnings({"unchecked","rawtypes"})
public class IndexController extends BaseController {
    @Autowired
    private IIndexService indexService;

    @Operation(summary = "获取首页数据")
    @GetMapping
    public AjaxResult index()   {
        return success(indexService.getIndexData());
    }
}
